home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / drivexx.exe / DRIVEXX.TXT < prev    next >
Text File  |  1993-01-22  |  42KB  |  915 lines

  1. (********************************************************************)
  2. (*                             DRIVExx                              *)
  3. (*                                                                  *)
  4. (*                           Version 4.0                            *)
  5. (*                                                                  *)
  6. (*          Copyright (C) 1991-1993 by FeerKnott Computing          *)
  7. (*                                                                  *)
  8. (*           Portions Copyright (C) 1992 by PDG Software            *)
  9. (*                                                                  *)
  10. (*                       3922 Englewood Drive                       *)
  11. (*                       Champaign, IL  61821                       *)
  12. (*                                                                  *)
  13. (*                      (217) 355-8145 (voice)                      *)
  14. (*                      (217) 355-9661 (modem)                      *)
  15. (*                         CIS [71160,1045]                         *)
  16. (*                                                                  *)
  17. (*                       ALL RIGHTS RESERVED                        *)
  18. (********************************************************************)
  19. (********************************************************************)
  20. (*                Written by:  Charles B. Little, Ph.D.             *)
  21. (*                   Version:  4.00                                 *)
  22. (*             Revision Date:  22 January 1993                      *)
  23. (*                  Language:  Turbo Pascal v7                      *)
  24. (********************************************************************)
  25.  
  26.  
  27. I.         INTRODUCTION:
  28.  
  29. DRIVExx is a collection of tools, written in Turbo Pascal v7 (v6 TPU
  30. available on request), for dealing with block devices in a DOS
  31. environment.  To the best of our knowledge, no such tools exist in any
  32. "professional" programming toolboxes, in any programming language. 
  33. The tools available here will allow any Pascal programmer who uses
  34. disk I/O to gain that extra measure of control over his or her
  35. application.  At the very least they will have the ability to prevent
  36. access of a phantom drive so their nice user interface won't get
  37. overwritten by non-interceptable DOS messages like "Insert diskette
  38. for drive B: and ..."
  39.  
  40. No pretense is made that DRIVExx is flawless and can't be confused by
  41. a determined user who knows all the SUBST, JOIN and ASSIGN tricks, but
  42. it seems to work for the things most programmers need.  And just about
  43. everything you'd want your applications to know about drives is
  44. available WITHOUT ACCESSING THEM!  The only exceptions to hitting
  45. drives are functions GETDPB and DiskWasChanged:  GETDPB will hit the
  46. disk to read its boot sector, BUT ONLY IF YOU TELL IT TO; and
  47. DiskWasChanged will use a BIOS function that spins the disk ONLY if
  48. the drive supports changeline detection.  And even in these two cases,
  49. NO unrecoverable error will result if the functions are executed on a
  50. removable drive that doesn't have a disk in it.
  51.  
  52. Much of the required information is available only through
  53. undocumented DOS functions and data structures.  Wherever a documented
  54. function will return the same information, however, the undocumented
  55. function is still used as a redundancy check.  Indeed, the source code
  56. for DRIVExx is probably at least 50% longer than need be due to
  57. extensive interlocking redundancy checking.
  58.  
  59. Most of the features of DRIVExx are demonstrated in the demo program
  60. DRVDEMO.PAS.  The major exceptions are functions ReadDiskSectors and
  61. WriteDiskSectors, and function MakeDriveActive, whose description
  62. below should make clear why it is impractical to include it in
  63. DRVDEMO.
  64.  
  65. DRIVExx is currently available only for TP7, but a TP6 format TPU is
  66. available on request.  We made the decision to use BASM for all
  67. assembler modules to eliminate the need to distribute OBJ files.  This
  68. means that all you need to use DRIVExx is DRIVEXX.TPU.  Consideration
  69. will be given to releasing a TP5 version,  or even porting to C - if
  70. enough users express a desire.
  71.  
  72.  
  73.  
  74. II.        CONDITIONS:
  75.  
  76. DRIVExx is not free.  IT IS SHAREWARE AND IT IS COPYRIGHTED.  If you
  77. use it you should pay for it -- that's how shareware works.  However,
  78. you only pay the registration fee.  Absolutely no royalties are
  79. expected or will be sought if you use it in any commercial program. 
  80. It comes with the usual caveats (spelled out in the REGISTRATION/ORDER
  81. FORM) about suitability, limits of liability, etc.
  82.  
  83. The registration fee is $10.  Fees for DRIVExx should be accompanied
  84. by a completed REGISTRATION/ORDER FORM, found in the file
  85. REGISTER.TXT.  A non-disclosure agreement with a major vendor will
  86. make it impossible to release the ENTIRE source code as is.  A
  87. working, compilable version - EXCLUDING the small amount of code
  88. covered by the NDA - may be made available.  If so, we will tell you
  89. where to find the "forbidden" information yourself in a book called
  90. "PC Interrupts"; it will still be up to you to write the code.  Fees
  91. and distribution agreements for source code have not yet been
  92. established.
  93.  
  94. Since DRIVExx has not been tested on every conceivable platform and
  95. under every flavor of DOS out there, special consideration (i.e., fee
  96. waiver or free upgrades) will be given to any user who reports bugs or
  97. anomalous behavior, and can suggest a fix.  IN OTHER WORDS, BE A BETA
  98. TESTER AND GET DRIVExx FREE FOREVER!
  99.  
  100. You may distribute DRIVExx freely as long as all 7 files in the
  101. original ZIP file are distributed.  Those files are:
  102.  
  103.     DRIVExx.TXT   size = 39389, date = 1/22/93, time = 4:00am
  104.     (This file)
  105.  
  106.     REGISTER.TXT  size = 1944,  date = 1/22/93, time = 4:00am
  107.     (Product registration form)
  108.  
  109.     DRIVExx.TPU   size = 22160, date = 1/22/93, time = 4:00am
  110.  
  111.     DRVDEMO.PAS   size = 6349,  date = 1/22/93, time = 4:00am
  112.     (Demo program source code - must have DRIVExx.TPU and DRVDEMO.INC to
  113.     recompile)
  114.  
  115.     DRVDEMO.INC   size = 5882,  date = 1/22/93, time = 4:00am
  116.  
  117.     DRVDEMO.EXE   size = 32224, date = 1/22/93, time = 4:00am
  118.     (Ready to run demo program)
  119.  
  120.     NTRFACE.TXT   size = 10827, date = 1/22/93, time = 4:00am
  121.     (Actual INTERFACE section from DRIVExx.PAS)
  122.  
  123.  
  124. See section VIII for details on product support.
  125.  
  126.  
  127.  
  128. III.       REQUIREMENTS:
  129.  
  130. DOS versions supported: MS-DOS or PC-DOS 3.0 to 5.0; DR DOS 5 or 6.
  131. Hardware supported: IBM or IBM-compatible PC, XT, AT, or PS/2.
  132.  
  133.  
  134.  
  135.  
  136. IV.        ACKNOWLEDGEMENTS:
  137.  
  138. MS-DOS and SMARTDRV are trademarks of the Microsoft Corporation
  139. DR DOS is a trademark of Digital Research, Inc.
  140. PC Tools Deluxe is a trademark of Central Point Software
  141. NCACHE is a trademark of Symantec Corporation
  142. Stacker is a trademark of Stac Electronics
  143. NetWare is a trademark of Novell
  144.  
  145. Any PRODUCT NAME used in this document, but not mentioned above, is
  146. likely to be a registered trademark of the company that makes the
  147. product.  There.
  148.  
  149. DRIVExx is based on information found in the following monographs:
  150.  
  151.     The MS-DOS Encyclopedia, R. Duncan, ed., Microsoft Press, 1988
  152.     MS-DOS Programmer's Reference, Microsoft Press, 1991
  153.     Advanced MS-DOS Programming, R. Duncan, Microsoft Press, 1988
  154.     Undocumented DOS, Schulman, et. al., eds., 1990
  155.     DOS Programmer's Reference, 3rd ed, Dettmann & Johnson, eds., 1992
  156.     PC Interrupts, Brown and Kyle, Addison-Wesley, 1991
  157.     System BIOS for ..., Phoenix Technologies, Addison-Wesley, 1989
  158.     The Programmer's PC Sourcebook, T. Hogan, Microsoft Press, 1991
  159.  
  160.  
  161.  
  162. V.         VERSION NOTES:
  163.  
  164. This version of DRIVExx contains the expected code refinements and bug
  165. fixes for previous versions, but it also is missing some features of
  166. previous versions that we thought were pretty useful.  The function
  167. "DriveIsDeviceDriven" is the main casualty in DRIVExx version 4,
  168. thanks to the release of SmartDrv version 4.  This little Microsoft
  169. monster makes it impossible (as far as we know) to walk the device
  170. driver chain and match up drives with device drivers and thereby
  171. distinguish BIOS-dri